#!/usr/bin/env python
# -*- coding:utf-8 -*-
from django import forms
from .models import UserModel
# 用户注册表单验证
# class UserRegisterForm(forms.Form):
#     username = forms.CharField(max_length=10)
#     password = forms.CharField(max_length=10)
#     email = forms.EmailField()

class UserRegisterForm(forms.ModelForm):
    class Meta:
        model = UserModel
        fields = '__all__'

class UserLoginForm(forms.ModelForm):
    # 登录表单
    class Meta:
        model = UserModel
        fields=['username','password']

